//
//  HDIndividualInformationCell2.swift
//  HuaDaoPeifu
//
//  Created by liangyuanliangyuan on 16/4/19.
//  Copyright © 2016年 paiyipai. All rights reserved.
//

import UIKit

class HDIndividualInformationCell2: UITableViewCell {

    var headText = UILabel()
    var headImage = UIImageView()
    var pointImage = UIImageView()
    
    var backView = UIView()
//    var line1 = UILabel()
//    var line2 = UILabel()
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        //cell上下两条线
//        line1.frame = CGRectMake(0, 0, AppConstant.screenWidth, 0.4)
//        line1.backgroundColor = UIColor(hex: 0xdbdbdb)
//        self.addSubview(line1)
//        line2.backgroundColor = UIColor(hex: 0xdbdbdb)
//        self.addSubview(line2)
//        line2.snp.makeConstraints { (make) in
//            make.left.equalTo(0)
//            make.right.bottom.equalTo(0)
//            make.height.equalTo(0.4)
//        }

        
        headText = UILabel()
        headText.textColor = UIColor(hex: 0x333333)
        headText.font = UIFont.systemFont(ofSize: 15)
        self.addSubview(headText)
        headText.snp.makeConstraints { (make) in
            make.left.equalTo(15.0)
            make.width.equalTo(70)
            make.centerY.equalTo(self.snp.centerY).offset(0)
        }
        
        pointImage = UIImageView(image: UIImage(named: "into"))
        self.addSubview(pointImage)
        pointImage.snp.makeConstraints { (make) in
            make.right.equalTo(-15.0)
            make.width.equalTo(15)
            make.height.equalTo(15)
            make.centerY.equalTo(self.snp.centerY)
        }
        
        headImage = UIImageView()
        headImage.layer.masksToBounds = true
        headImage.layer.cornerRadius = 28
        headImage.isUserInteractionEnabled = true
        self.addSubview(headImage)
        headImage.snp.makeConstraints { (make) in
            make.right.equalTo(pointImage.snp.left).offset(-15)
            make.width.equalTo(56)
            make.height.equalTo(56)
            make.centerY.equalTo(self.snp.centerY)
        }
        
    }
    
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    
    func refreshData(){
        headText.text = "头像"
        headImage.image = UIImage(named: "个人中心默认头像")
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
